
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>ppp</title>
        <style type="text/css">
     
            #pop div {float:left;
                width:90px;
                height:90px;
                background:black;
                margin:15px 10px 15px 0;
                overflow:hidden;
                zoom:1;}
            
        </style>
        
    </head>
    <body>
       <div id="pop">
          <input type="button" id ="btn1" value="点击将div变成红色" /><br />
           <div></div>
           <div></div>
           <div></div>
       </div>
    </body>
</html>
<script>
    window.onload = function() {

    var app = document.getElementsByTagName("div");
      
    var arr = document.getElementById("btn1");
        arr.onclick = function (){
            for (var i=1;i<app.length;i++){
            app[i].style.background="red";
            }
        }
    }
</script>